package cn.gson.springboot.controller;

import cn.gson.springboot.model.mapper.OpportunityViewMapper;
import cn.gson.springboot.model.pojos.Opportunity;
import cn.gson.springboot.model.service.OpportunityViewService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class OpportunityViewController {
    @Autowired
    OpportunityViewService oppViewService;

    @RequestMapping("/emp-opp-id")
    @ResponseBody
    public Opportunity EmpOppList(Integer oppId, HttpSession session) {
        //Employee emp = (Employee) session.getAttribute("emp");
        Opportunity opp = oppViewService.selectEmpOpportunityById(oppId);
        return opp;
    }

}
